package itbour.onetouchshow.bean;


import java.io.Serializable;
import java.util.List;

/**
 * Created by Administrator on 2018/6/22.
 */

public class FreeCreateOrigin implements Serializable {

    /**
     * ct : 1105
     * width : 1920
     * height : 1080
     * duration : 35
     * rate : {"num":30,"den":1}
     * mainAssets : [{"ct":1403,"id":1,"start":0,"duration":7,"w":960,"h":540,"tempurl":"http://itbour-user.oss-cn-hangzhou.aliyuncs.com/image/U31/2018/06/166/132717382_boNDH1QNyfiFGfqAbAcy.jpg","url":"http://itbour-user.oss-cn-hangzhou.aliyuncs.com/video/U31/2018/06/166/132717791_PedyVYFNN8YEbcMFwf6J"},{"ct":1403,"id":2,"start":7,"duration":7,"w":960,"h":540,"tempurl":"http://itbour-user.oss-cn-hangzhou.aliyuncs.com/image/U31/2018/06/166/133117966_DSQiZLCyYLnDPVhQtHiF.jpg","url":"http://itbour-user.oss-cn-hangzhou.aliyuncs.com/video/U31/2018/06/166/133118314_02UDoyxoi7KFqtXnzwQF"},{"ct":1403,"id":3,"start":14,"duration":7,"w":960,"h":540,"tempurl":"http://itbour-user.oss-cn-hangzhou.aliyuncs.com/image/U31/2018/06/166/132441281_elDrnkrH6JD45gtEPedY.jpg","url":"http://itbour-user.oss-cn-hangzhou.aliyuncs.com/video/U31/2018/06/166/132442816_qvBwInHEiPiZ6jT9tONp"},{"ct":1403,"id":4,"start":21,"duration":7,"w":960,"h":540,"tempurl":"http://itbour-user.oss-cn-hangzhou.aliyuncs.com/image/U31/2018/06/166/132904235_phoCn1uJHifMzVkomccu.jpg","url":"http://itbour-user.oss-cn-hangzhou.aliyuncs.com/video/U31/2018/06/166/132904624_eVB47PZaZQsVAbc7CgYj"},{"ct":1403,"id":5,"start":28,"duration":7,"w":960,"h":540,"tempurl":"http://itbour-user.oss-cn-hangzhou.aliyuncs.com/image/U31/2018/06/166/131801087_7GCuWBjoEwM0b8qdKFDX.jpg","url":"http://itbour-user.oss-cn-hangzhou.aliyuncs.com/video/U31/2018/06/166/131801620_RFZ7pxQRIJlp2kdVIlx3"}]
     * audioAssets : []
     * effects : [{"ct":1602,"assetId":1,"start":0,"duration":7,"params":{"r":1,"g":0.5,"b":0}}]
     * transition : [{"dbId":1036,"ct":1502,"assetid":[1,2],"intersect":1.48,"duration":2,"layer":{"2":{"start":0,"duration":1.76},"3":{"start":0.28,"duration":1.72}}},{"dbId":1036,"ct":1502,"assetid":[2,3],"intersect":1.48,"duration":2,"layer":{"2":{"start":0,"duration":1.76},"3":{"start":0.28,"duration":1.72}}},{"dbId":1036,"ct":1502,"assetid":[3,4],"intersect":1.48,"duration":2,"layer":{"2":{"start":0,"duration":1.76},"3":{"start":0.28,"duration":1.72}}},{"dbId":1036,"ct":1502,"assetid":[4,5],"intersect":1.48,"duration":2,"layer":{"2":{"start":0,"duration":1.76},"3":{"start":0.28,"duration":1.72}}}]
     */

    private int ct;
    private int width;
    private int height;
    private double duration;
    private RateBean rate;
    private List<MainAssetsBean> mainAssets;
    private List<EffectsBean> effects;
    private List<TransitionsBean> transitions;
    private List<MusicInfoBean> audioAssets;


    //兼容作品字段
    private int productId;
    private int docId;
    private int opType;

    public List<MusicInfoBean> getAudioAssets() {
        return audioAssets;
    }

    public void setAudioAssets(List<MusicInfoBean> audioAssets) {
        this.audioAssets = audioAssets;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public int getDocId() {
        return docId;
    }

    public void setDocId(int docId) {
        this.docId = docId;
    }

    public int getOpType() {
        return opType;
    }

    public void setOpType(int opType) {
        this.opType = opType;
    }

    public int getCt() {
        return ct;
    }

    public void setCt(int ct) {
        this.ct = ct;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public double getDuration() {
        return duration;
    }

    public void setDuration(double duration) {
        this.duration = duration;
    }

    public RateBean getRate() {
        return rate;
    }

    public void setRate(RateBean rate) {
        this.rate = rate;
    }

    public List<MainAssetsBean> getMainAssets() {
        return mainAssets;
    }

    public void setMainAssets(List<MainAssetsBean> mainAssets) {
        this.mainAssets = mainAssets;
    }

    public List<EffectsBean> getEffects() {
        return effects;
    }

    public void setEffects(List<EffectsBean> effects) {
        this.effects = effects;
    }

    public List<TransitionsBean> getTransition() {
        return transitions;
    }

    public void setTransition(List<TransitionsBean> transition) {
        this.transitions = transition;
    }

    public List<TransitionsBean> getTransitions() {
        return transitions;
    }

    public void setTransitions(List<TransitionsBean> transitions) {
        this.transitions = transitions;
    }

//    public static class AudioAssetsBean {
//        /**
//         * id : 4
//         * ct : 1404
//         * start : 0
//         * duration : 7
//         * url : http://itbour-user.oss-cn-hangzhou.aliyuncs.com/video/U20/2018/06/157/164335966_MfTwbt66GsZzOUI6IdHA
//         */
//
//        @SerializedName("id")
//        private int idX;
//        @SerializedName("ct")
//        private int ctX;
//        @SerializedName("start")
//        private int startX;
//        @SerializedName("duration")
//        private int durationX;
//        private String url;
//
//        public int getIdX() {
//            return idX;
//        }
//
//        public void setIdX(int idX) {
//            this.idX = idX;
//        }
//
//        public int getCtX() {
//            return ctX;
//        }
//
//        public void setCtX(int ctX) {
//            this.ctX = ctX;
//        }
//
//        public int getStartX() {
//            return startX;
//        }
//
//        public void setStartX(int startX) {
//            this.startX = startX;
//        }
//
//        public int getDurationX() {
//            return durationX;
//        }
//
//        public void setDurationX(int durationX) {
//            this.durationX = durationX;
//        }
//
//        public String getUrl() {
//            return url;
//        }
//
//        public void setUrl(String url) {
//            this.url = url;
//        }
//    }

    public static class RateBean {
        /**
         * num : 30
         * den : 1
         */

        private int num;
        private int den;

        public int getNum() {
            return num;
        }

        public void setNum(int num) {
            this.num = num;
        }

        public int getDen() {
            return den;
        }

        public void setDen(int den) {
            this.den = den;
        }
    }

    public static class MainAssetsBean implements Cloneable, Serializable {
        /**
         * ct : 1403
         * id : 1
         * start : 0
         * duration : 7
         * w : 960
         * h : 540
         * tempurl : http://itbour-user.oss-cn-hangzhou.aliyuncs.com/image/U31/2018/06/166/132717382_boNDH1QNyfiFGfqAbAcy.jpg
         * url : http://itbour-user.oss-cn-hangzhou.aliyuncs.com/video/U31/2018/06/166/132717791_PedyVYFNN8YEbcMFwf6J
         */

        private int ct;
        private int id;
        private double start;
        private double duration;
        private int w;
        private int h;
        private String coverImage;
        private String url;
        private String processedUrl;
        private int an;

        private List<LetterBean> subTitles;

        public List<LetterBean> getSubTitles() {
            return subTitles;
        }

        public void setSubTitles(List<LetterBean> subTitles) {
            this.subTitles = subTitles;
        }

        public int getAn() {
            return an;
        }

        public void setAn(int an) {
            this.an = an;
        }

        public String getProcessedUrl() {
            return processedUrl;
        }

        public void setProcessedUrl(String processedUrl) {
            this.processedUrl = processedUrl;
        }

        public int getCt() {
            return ct;
        }

        public void setCt(int ct) {
            this.ct = ct;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public double getStart() {
            return start;
        }

        public void setStart(double start) {
            this.start = start;
        }

        public double getDuration() {
            return duration;
        }

        public void setDuration(double duration) {
            this.duration = duration;
        }

        public int getW() {
            return w;
        }

        public void setW(int w) {
            this.w = w;
        }

        public int getH() {
            return h;
        }

        public void setH(int h) {
            this.h = h;
        }

        public String getCoverImage() {
            return coverImage;
        }

        public void setCoverImage(String coverImage) {
            this.coverImage = coverImage;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof MainAssetsBean)) return false;

            MainAssetsBean that = (MainAssetsBean) o;

            if (id != that.id) return false;
            return url.equals(that.url);
        }

        @Override
        public int hashCode() {
            int result = id;
            result = 31 * result + url.hashCode();
            return result;
        }

        @Override
        public Object clone() {
            MainAssetsBean stu = null;
            try {
                stu = (MainAssetsBean) super.clone();
            } catch (CloneNotSupportedException e) {
                e.printStackTrace();
            }
            return stu;
        }
    }


}
